<template>
	<div>
		{{a}}
		<span class="iconfont">&#xe638;</span>
		<div @click="clickKiss">{{this.temporaryArr}}</div>
    <img ref="img" />
	</div>
</template>

<script>
import { mapState, mapActions } from 'vuex'
import axios from 'axios'
import Aimg from 'img/a.jpg'
export default {
  name: 'Test',
  mounted () {
    axios.get('/react/api/header.json').then()
    this.$refs.img.src = Aimg
  },
  data() {
    return {
      a: 'ssss'
    }
  },
  methods: {
    clickKiss() {
      this.changeName('魏琪老婆大人')
    },
    ...mapActions(['changeName'])
  },
  computed: {
    ...mapState(['temporaryArr'])
  }
}
</script>